using Zhaoxi.Zhihu.Core.QuestionAggregate.Entites;
using Zhaoxi.Zhihu.SharedKerel.Specification;

namespace Zhaoxi.Zhihu.Core.QuestionAggregate.Specifications;

public class QuestionByIdSpec: Specification<Question>
{
    // 修正2：添加支持单个 ID 的构造函数重载
    public QuestionByIdSpec(int id)
    {
        FilterCondition = question => question.Id == id;
    }

    public QuestionByIdSpec(int[] ids)
    {
        FilterCondition = question=> ids.Contains(question.Id);
    }
}